#define MYNAME "exif"
+#define UNKNOWN_TIMESTAMP 999999999
+
typedef struct exif_tag_s {
gbuint16 tag;
gbuint16 type;
if (! next_ifd) continue; /* No IFD0 ? */
ifd = gps_ifd = exif_ifd = 0;
- timestamp = (SECONDS_PER_DAY * 99);
+ timestamp = UNKNOWN_TIMESTAMP;
/* we need the wpt not only during GPS IFD */
wpt = waypt_new();
if (! wpt) return;
-#if 0
- if (timestamp != (SECONDS_PER_DAY * 99)) {
- // wpt->creation_time = timestamp;
+ if (wpt->creation_time && (timestamp != UNKNOWN_TIMESTAMP)) {
+ struct tm tm;
+ tm = *gmtime(&wpt->creation_time);
+ tm.tm_hour = 0;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ wpt->creation_time = mkgmtime(&tm) + timestamp;
}
-#endif
+
if (opt_filename) {
char *c, *cx;
char *str = xstrdup(fin->name);
xfree(str);
}
waypt_add(wpt);
+
return;
}
}
exif_args,
CET_CHARSET_ASCII, 0
};
+
/**************************************************************************/
No,Latitude,Longitude,Name,Speed,Satellites,Date,Time\r
-1,44.315150,15.265690,"IMG_2065",0.0,4,2006/05/21,17:46:57\r
+1,44.315150,15.265690,"IMG_2065",0.0,4,2006/05/21,20:46:58\r